/*package demo2;

public class Text {
    public ListNode mergeTwoLists(ListNode list1, ListNode list2) {
        ListNode node = new ListNode(-1);
        ListNode head = node;
        ListNode cur = head;
        if(list1 == null && list2 == null){
            return list1;
        }
        while(list1 != null && list2 != null){
            if(list1.val <= list2.val){
                cur.next = list1;
                list1 = list1.next;
            }else {
                cur.next = list2;
                list2 = list2.next;
            }
            cur = cur.next;
        }
        if(list1 == null){
            cur.next = list2;
        }else {
            cur.next = list1;
        }
        head = head.next;
        return head;

    }
}*/
